package com.DeliveryProgram.www.po;

import com.DeliveryProgram.www.dao.BusLoad;

import java.util.Date;
import java.util.List;

public class Order {
    public Order() {
    }

    private int id;
    /**订单的价格*/
    private int money;
    /**判断订单是否完成的值,1为未接单，2为已接单，3为完成订单*/
    private int isComplete;
    /**订单中的菜品*/
    private List<Menu> odmu;
    /**订单地址*/
    private Address address;
    /**下单日期*/
    private Date date;

    /**店家*/
    private String shop;

    public Order(int id,int isComplete,Address address,Date date,int money){
        this.id=id;
        this.address=address;
        this.isComplete=isComplete;
        this.date=date;
        this.money=money;
        odmu= BusLoad.loadOrder(id);

    }

    public Order(int id,int isComplete,Address address,Date date,int money,String shop){
        this.id=id;
        this.address=address;
        this.isComplete=isComplete;
        this.date=date;
        this.money=money;
        this.shop=shop;
        odmu= BusLoad.loadOrder(id);

    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public int getIsComplete() {
        return isComplete;
    }

    public void setIsComplete(int isComplete) {
        this.isComplete = isComplete;
    }

    public List<Menu> getOdmu() {
        return odmu;
    }

    public void setOdmu(List<Menu> odmu) {
        this.odmu = odmu;
    }

    public void setOdmu(Menu odmu) {
        this.odmu.add(odmu);
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public String getShop() {
        return shop;
    }
}
